<?php

// +----------------------------------------------------------------------
// | 文件 FeedbackToolEvent.class.php
// +----------------------------------------------------------------------
// | 说明 处理工具反馈的信息
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------
// | Author: 谢赤心 Legend. <xcx_legender@qq.com>
// +----------------------------------------------------------------------

namespace Api\Event;

class FeedbackToolEvent extends BaseEvent {

	// 添加卸载的反馈信息
	public function addUninstall($data) {
		$feedback_type_uninstall = 'uninstall';
		$save = [
			'type' => $feedback_type_uninstall,
			'data' => array_filter_by_array($data, ['qq', 'phone', 'reasons', 'others']),
		];
		service('FeedbackTool')->create($save) && service('FeedbackTool')->add();
	}

}